<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <title>手风琴案例</title>
    <link rel="stylesheet" href="./css/index.css">
    <style>
        .small {
            display: inline-block;
            vertical-align: middle;
            margin-right: 10px;
        }

        .big {
            width: 224px;
            height: auto;
        }
    </style>
</head>

<body>
    <div id="king">
        <ul>
            <li class="current">
                <a href="#">
                    <img src="static\images\favicon.ico" alt="" class="small">
                    <img src="static\images\胡歌1.jpg" alt="" class="big">
                </a>
            </li>
            <li>
                <a href="#">
                    <img src="static\images\favicon.ico" alt="" class="small">
                    <img src="static\images\胡歌2.jpg" alt="" class="big">
                </a>
            </li>
            <li>
                <a href="#">
                    <img src="static\images\favicon.ico" alt="" class="small">
                    <img src="static\images\刘亦菲.jpeg" alt="" class="big">
                </a>
            </li>
        </ul>
    </div>

    <script src="static\js\jquery-3.7.1.min.js"></script>
    <script>
        $(document).ready(function () {
            $('#king li').mouseenter(function () {
                $(this).stop().animate({
                    width: 224
                }).find('.small').stop().fadeOut().siblings('.big').stop().fadeIn();
                $(this).siblings('li').stop().animate({
                    width: 69
                }).find('.small').stop().fadeIn().siblings('.big').stop().fadeOut();
            });
        });
    </script>
</body>

</html>